package com.itheima.chapter03.characterstring;
/*
    遍历字符串   s.toCharArray()字符串拆成数组
 */

import java.util.Scanner;

public class domestring9 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String s = sc.nextLine();
        char[] ch= s.toCharArray();
        for (int i = 0; i <ch.length ; i++) {
            System.out.println(ch[i]);
        }
    }
}
